﻿#pragma once

/* 一次模拟称为一个 Run */
#include <chrono>
#include <memory>

#include "G4Run.hh"
#include "G4UserRunAction.hh"
//#include "G4Timer.hh"

//class LETdMessenger;
//class RgProjScorerMsgr;
class AtomNumFilter;
class AtomNumFilterMsgr;

class RunAction : public G4UserRunAction
{
public:
    RunAction();
    ///声明每个Run开始时将被调用的函数：BeginOfRunAction(const G4Run*)
    void BeginOfRunAction(const G4Run*) override;
    ///声明每个Run结束时将被调用的函数：EndOfRunAction(const G4Run*)
    void EndOfRunAction(const G4Run*) override;

    using TimePoint = std::chrono::time_point<std::chrono::high_resolution_clock>;

private:
    TimePoint _seed0;
    TimePoint _seed1;

#if 0
private:
    mutable std::unique_ptr<LETdMessenger> _fLETdMessengerWorker;
    mutable std::unique_ptr<RgProjScorerMsgr> _rgProjScorerMsgrWorker;
#endif

    ///======================== Atom number score filter
private:
    //AtomNumScoreFilter* fAtomNSFilter;
    std::vector<AtomNumFilter*> _fAtomNSFilterVec;
    AtomNumFilterMsgr* _fAtomNumFilterMsgr;
};
